package com.example.eurekajob.controller;

import com.example.eurekajob.feign.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * @author zhangjunfa
 */
@RequestMapping
@RestController
public class TestController {

    @Autowired
    private FeignService feignService;

    @GetMapping("/findOne")
    public HashMap fineOne() {
        HashMap<String, Object> map = new HashMap<String, Object>();
        map.put("name", "陈");
        map.put("age", "18");
        map.put("address", "天字一号");
        return map;
    }


    @GetMapping("/testConsumerService")
    public String testConsumerService(){
        return feignService.testAdmin();
    }

}